/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.ingsoc2;

import java.sql.Connection;
import java.sql.SQLException;

/**
 *
 * @author sebastian
 */
public class FactoryMySQL implements FactoryDAO {
/**
 * 
 * @param conn
 * @return 
 */
    @Override
    public PeliculaDAO createDAOPelicula(Connection conn)  {
        PeliculaDAO pDAO ;

        pDAO = new PeliculaDAOMYSQL(conn);
        return pDAO;

    }
/**
 * 
 * @param conn
 * @return
 * @throws SQLException 
 */
    @Override
    public GeneroDAO createDAOGenero(Connection conn) throws SQLException {
        GeneroDAO gDAO;
        gDAO=new GeneroDAOMYSQL(conn);
        return gDAO;
    }
/**
 * 
 * @param conn
 * @return
 * @throws SQLException 
 */
    @Override
    public ModelDB createModelDB(Connection conn) throws SQLException{
        ModelDB mDB;
        mDB = new ModelDBMYSQL();
        return mDB;
    }
/**
 * 
 * @param strConn
 * @param usr
 * @param pwd
 * @return
 * @throws SQLException 
 */
    @Override
    public Connection createConnection(String strConn,String usr , String pwd) throws SQLException{
        ConnectionFactory mConn;
        mConn=new ConnectionMYSQL();
        return mConn.createConn(strConn, strConn, strConn);
                
    }
}
